package com.isoft.service.tableservice;

import com.isoft.dao.tabledao.DfmeOnreDao;
import com.isoft.entity.tableentity.dfme_onre.DfmeOnreMsg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;

@Service
@Slf4j
public class DfmeOnreService {
    @Autowired
    DfmeOnreDao dfmeOnreDao;
    public int insertmsg(DfmeOnreMsg dfmeOnreMsg) throws Exception{
        Timestamp create_time = new Timestamp(System.currentTimeMillis());
        dfmeOnreDao.insertMeta(create_time,dfmeOnreMsg.getDfmeOnreMeta());
        return dfmeOnreDao.insertDflt(dfmeOnreMsg.getDfmeOnreMeta().getSeqn(),create_time,dfmeOnreMsg.getDfmeOnreDflt());
    }
}
